package br.org.credfaz.ficha;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class Db2ConnectionFactory {
	
	/*public Connection getConnection() throws SQLException {
		System.out.println("conectando Base TCE...");

		try {
			Class.forName("com.ibm.db2.jcc.DB2Driver");
		} catch (ClassNotFoundException e) {
			throw new SQLException(e);
		}
		
		return DriverManager.getConnection("jdbc:db2://172.16.3.203:50200/COOP_TCE", "USR0560", "bEh7sJV/OM4GE");
		
	}*/
	public Connection getConnection() throws SQLException {
		System.out.println("conectando Base local...");

		try {
			Class.forName("com.mysql.jdbc.Driver");
		} catch (ClassNotFoundException e) {
			throw new SQLException(e);
		}
		
		return DriverManager.getConnection("jdbc:mysql://localhost/credfaz-sis", "root", "123456");
		
	}

}
